(asdf:oos 'asdf:load-op 'cxml)
(defparameter *example*
  (cxml:parse-file "/home/asimakov/template.xml" (cxml-dom:make-dom-builder)))

(dom:tag-name (dom:document-element *example*))
(defparameter *child-nodes*
  (dom:child-nodes (dom:document-element *example*)))

(dom:get-attribute (dom:document-element *example*) "name")




(defun print-tags (document)
  "Print value tags"
  (let* ((child-nodes (dom:child-nodes (dom:document-element document)))
	 (length-doc (dom:length child-nodes)))
    (loop for n from 0 to (- length-doc 1)
       do (let ((child (dom:item child-nodes n)))
	    (if (dom:element-p child)
		(let* ((attribute-node-map (dom:attributes child))
		       (length-attr-node-map (dom:length attribute-node-map)))
		  (loop for m from 0 to (- length-attr-node-map 1)
		     do (format t "~&~a: ~a"
				(dom:name
				 (dom:item attribute-node-map m))
				(dom:get-attribute (dom:item child-nodes n)
						   (dom:name
						    (dom:item attribute-node-map m)))))))))))

(print-tags *example*)
